package cn.school.course.service;

import cn.school.course.entity.CoursePlan;
import cn.school.course.entity.CoursePlanConflict;
import cn.school.sys.entity.SysConfig;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Date;
import java.util.List;

/**
 * @className: 排课计划-冲突情况Service
 * @author: fangjin.tao
 * @date: 2023/1/5
 **/
public interface CoursePlanConflictService extends IService<CoursePlanConflict> {
	/**
	 * 将预生成的排课计划课程，转换成=>单节课程预生成的数据
	 *
	 * @throws
	 * @author fangjin.tao
	 * @param: coursePlan
	 * @updateTime 2023/1/10 15:31
	 */
	void saveTransCourseConflict(SysConfig coplConflictEnable, CoursePlan coursePlan);
	
	/**
	 * 处理排课计划冲突
	 * @author fangjin.tao
	 * @param: time
	 * @param: tetiTermEndDate
	 * @param: keyList
	 * @updateTime 2023/2/3 16:32
	 * @throws
	 */
	void saveCpcoConflictProcess(Date time, Date tetiTermEndDate, String teacherKey, List<String> keyList);
	
	/**
	 * 根据两种检测key获取冲突情况的ID列表
	 *
	 * @throws
	 * @author fangjin.tao
	 * @param: allTeacherKeyeyList
	 * @param: allRommKeyList
	 * @updateTime 2023/2/8 9:54
	 */
	List<Long> selectIdByKeyList(List<String> allTeacherKeyeyList, List<String> allRommKeyList);
	
	/**
	 * 根据ID列表直接更新为不冲突
	 *
	 * @throws
	 * @author fangjin.tao
	 * @param: idList
	 * @updateTime 2023/2/8 10:51
	 */
	void updateToNotConflict(List<Long> idList);
}
